package com.ssm.gbq.dao.impl;

import com.ssm.gbq.dao.ComplaintDao;
import com.ssm.gbq.mapper.ComplaintMapper;
import com.ssm.gbq.model.Complaint;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class ComplaintDaoImpl implements ComplaintDao {
    @Autowired
    private ComplaintMapper complaintMapper;


    @Override
    public List<Complaint> getALLComplaintTable(Complaint complaint, int currentPage, int pageSize) throws Exception {
        return complaintMapper.getALLComplaintTable(complaint,currentPage,pageSize);
    }

    @Override
    public int getALLComplaintTableCount(Complaint complaint) throws Exception {
        return complaintMapper.getALLComplaintTableCount(complaint);
    }

    @Override
    public int addComplaint(Complaint complaint) {
        return complaintMapper.addComplaint(complaint);
    }

    @Override
    public int updateComplaint(Complaint complaint) {
        return complaintMapper.updateComplaint(complaint);
    }

    @Override
    public int delComplaint(Integer id) {
        return complaintMapper.delComplaint(id);
    }

    @Override
    public Complaint showComplaintById(Integer id) {
        return complaintMapper.showComplaintById(id);
    }
}
